package cn.wolfcode.p2p.business.mapper;

import cn.wolfcode.p2p.base.query.PaymentScheduleQueryObject;
import cn.wolfcode.p2p.business.domain.PaymentSchedule;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface PaymentScheduleMapper {

    int insert(PaymentSchedule record);


    int queryForCount(PaymentScheduleQueryObject qo);

    List<PaymentSchedule> queryForList(PaymentScheduleQueryObject qo);

    PaymentSchedule selectByPrimaryKey(Long id);

    int listPaymentScheduleStatesByBidRequestId(@Param("bidRequestId") Long bidRequestId, @Param("paymentState") int paymentState);

    void updatePayDateAndState(PaymentSchedule paymentSchedule);

    void updateLatePayment(PaymentSchedule paymentSchedule);

    List<PaymentSchedule> listPaymentScheduleByState(int state);
}